package com.iqiyi.pps.epg.core.model.push;

/**
 * Created by zhang on 2016/2/22.
 */
public enum EpgPlayPlatformTypeEnum {
    QIYIIOSIPHONE(12),QIYIIOSIPAD(13),QIYIANDRIODPHONE(10),QIYIANDRIODPAD(11),PPSIOSIPHONE(2),PPSIOSIPAD(3),PPSANDRIODPHONE(5),PPSANDRIODPAD(18);

    private int playPlatformId;

    EpgPlayPlatformTypeEnum(int playPlatformId) {
        this.playPlatformId = playPlatformId;
    }

    public int getPlayPlatformId() {
        return playPlatformId;
    }

    public void setPlayPlatformId(int playPlatformId) {
        this.playPlatformId = playPlatformId;
    }

    public static EpgPlayPlatformTypeEnum convert(PassportAgentTypeEnum passportAgentTypeEnum) {
        EpgPlayPlatformTypeEnum epgPlayPlatformTypeEnum = null;
        switch (passportAgentTypeEnum) {
            case PPSANDRIODPAD:
                epgPlayPlatformTypeEnum = PPSANDRIODPAD;
                break;
            case PPSANDRIODPHONE:
                epgPlayPlatformTypeEnum = PPSANDRIODPHONE;
                break;
            case PPSIOSIPAD:
                epgPlayPlatformTypeEnum = PPSIOSIPAD;
                break;
            case PPSIOSIPHONE:
                epgPlayPlatformTypeEnum = PPSIOSIPHONE;
                break;
            case QIYIIOSIPHONE:
                epgPlayPlatformTypeEnum = QIYIIOSIPHONE;
                break;
            case QIYIIOSIPAD:
                epgPlayPlatformTypeEnum = QIYIIOSIPAD;
                break;
            case QIYIANDRIODPHONE:
                epgPlayPlatformTypeEnum = QIYIANDRIODPHONE;
                break;
            case QIYIANDRIODPAD:
                epgPlayPlatformTypeEnum = QIYIANDRIODPAD;
                break;
            default:
        }
        return epgPlayPlatformTypeEnum;
    }

    public static EpgPlayPlatformTypeEnum valueOf(Integer playPlatformId) {
        switch (playPlatformId) {
            case 2:
                return PPSIOSIPHONE;
            case 3:
                return PPSIOSIPAD;
            case 5:
                return PPSANDRIODPHONE;
            case 10:
                return QIYIANDRIODPHONE;
            case 11:
                return QIYIANDRIODPAD;
            case 12:
                return QIYIIOSIPHONE;
            case 13:
                return QIYIIOSIPAD;
            case 18:
                return PPSANDRIODPAD;
        }
        return null;
    }

}
